package com.sky.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 *
 */
//@Aspect
@Component
public class MyAspect {

    @Pointcut("execution(* com.controller.*Controller.*(..))")
    public void myPointCut(){

    }
    @Before(value = "myPintCut")
    public void beforemyAdvice(JoinPoint joinPoint){
       System.out.println("进入before");
       System.out.println(joinPoint.getSignature());
    }
    @Before(value = "myPintCut")
    public void aftermyAdvice(JoinPoint joinPoint){
        System.out.println("进入after");
        System.out.println(joinPoint.getSignature());
    }
}
